package net.sky.oa.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *维修申请-选项表
 *FloApplyOption. @author hond
 */
@Entity
@Table(name = "FLO_APPLY_OPTION")//维修申请_选项表
public class FloApplyOption implements Serializable {

	private static final long serialVersionUID = 5673991033245515351L;
	
	// Fields
	private Long id;
	private Short count;        //数量
	private Boolean isinstead;  //是否换新：1是2否
	private String desn;        //描述
	private Byte status;        //状态
	private FloMendapply mendapply;//维修申请id
	private FloMendoption mendoption; //维修选项id

	// Constructors

	/** default constructor */
	public FloApplyOption() {
	}

	/** minimal constructor */
	public FloApplyOption(Long id) {
		this.id = id;
	}
	
	@Id 
	@SequenceGenerator(name="SQ_FLOAPPLYOPTION_ID",sequenceName="SQ_FLOAPPLYOPTION_ID",allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="SQ_FLOAPPLYOPTION_ID")
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "COUNT", precision = 3, scale = 0)
	public Short getCount() {
		return this.count;
	}

	public void setCount(Short count) {
		this.count = count;
	}

	@Column(name = "ISINSTEAD", precision = 1, scale = 0)
	public Boolean getIsinstead() {
		return this.isinstead;
	}

	public void setIsinstead(Boolean isinstead) {
		this.isinstead = isinstead;
	}

	@Column(name = "DESN", length = 100)
	public String getDesn() {
		return this.desn;
	}

	public void setDesn(String desn) {
		this.desn = desn;
	}

	@Column(name = "STATUS", precision = 2, scale = 0)
	public Byte getStatus() {
		return this.status;
	}

	public void setStatus(Byte status) {
		this.status = status;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MENDAPPLY_ID")
	public FloMendapply getMendapply() {
		return this.mendapply;
	}

	public void setMendapply(FloMendapply mendapply) {
		this.mendapply = mendapply;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MENDOPTION_ID")
	public FloMendoption getMendoption() {
		return this.mendoption;
	}

	public void setMendoption(FloMendoption mendoption) {
		this.mendoption = mendoption;
	}

}